﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Microsoft.SharePoint;
using TemplateLibraryConnector.Utility;

namespace TemplateLibraryConnector.Data
{
    public abstract class BaseTemplates
    {
        private readonly TemplateLibrarySettings _settings;

        protected BaseTemplates()
        {
        }

        protected TemplateLibrarySettings Settings
        {
            get { return _settings; }
        }

        protected BaseTemplates(TemplateLibrarySettings settings)
        {
            _settings = settings;
        }

        public abstract DataTable Items();

        //Override this to get per view, otherwise return all items
        public virtual DataTable GetItems(Guid viewId)
        {
            return Items();
        }

        

       

    }
}
